const mongoose = require('mongoose')

// 创建schema
var userSchema = new mongoose.Schema({
    phone: { type: Number, required: true },
    name: { type: String, required: true },
    password: { type: String, required: true },
    age: Number,
    gender: { type: Number, default: 1 },
    bio: String
})
// schema转化为数据模型
var User = mongoose.model('users', userSchema)

module.exports = User